package com.cacho.s2b.lesson.design;

/**
 * @Description 单例模式：7.静态内部类【推荐使用】
 * @Author LingWei
 * @date 2023/12/14
 **/
public class Singleton7 {
    private Singleton7(){}
    private static class SingletionInstance{
        private static final Singleton7 INSTANCE = new Singleton7();
    }
    public static Singleton7 getInstance(){
        return SingletionInstance.INSTANCE;
    }
}